package fr.pascal.client.place;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;

public class DetailPlace extends Place {

	private String animalId;
	
	public DetailPlace(String token) {
		this.animalId = token;
	}

	public String getAnimalId() {
		return animalId;
	}

	@Prefix("detail")
	public static class Tokenizer implements PlaceTokenizer<DetailPlace> {

		@Override
		public DetailPlace getPlace(String token) {
			return new DetailPlace(token);
		}

		@Override
		public String getToken(DetailPlace place) {
			return place.getAnimalId();
		}
	}
}
